/*
 * @Descripttion: 常量定义
 * @LastEditors: chen.long
 * @LastEditTime: 2024-02-24 10:52:03
 */

// 私有元素属性
export const YBMICRO_APP_ID = 'data-ybmicro-id';
export const LOADING_DATA_FLAG = 'data-loading-flag';
export const YBMICRO_SCRIPT_ID = 'data-ybmicro-script-id';
export const YBMICRO_DATA_FLAG = 'data-ybmicro-Flag';
export const CONTAINER_POSITION_DATA_FLAG = 'data-container-position-flag';
export const CONTAINER_OVERFLOW_DATA_FLAG = 'data-container-overflow-flag';

// 需要使用的某些固定变量
export const YBMICRO_ALL_EVENT = '_ybmicro_all_event';
export const YBMICRO_LOADING_STYLE =
  'position: absolute; width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; z-index:1;';

export const YBMICRO_LOADING_SVG = `<svg xmlns="http://www.w3.org/2000/svg" width="24px" height="30px" viewBox="0 0 24 30">
<rect x="0" y="13" width="4" height="5" fill="#909090">
  <animate attributeName="height" attributeType="XML" values="5;21;5" begin="0s" dur="0.6s" repeatCount="indefinite"></animate>
  <animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0s" dur="0.6s" repeatCount="indefinite"></animate>
</rect>
<rect x="10" y="13" width="4" height="5" fill="#909090">
  <animate attributeName="height" attributeType="XML" values="5;21;5" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate>
  <animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0.15s" dur="0.6s" repeatCount="indefinite"></animate>
</rect>
<rect x="20" y="13" width="4" height="5" fill="#909090">
  <animate attributeName="height" attributeType="XML" values="5;21;5" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate>
  <animate attributeName="y" attributeType="XML" values="13; 5; 13" begin="0.3s" dur="0.6s" repeatCount="indefinite"></animate>
</rect>
</svg>`;

// 提醒类
export const YBMICRO_TIPS_NO_URL = 'url参数为空';
export const YBMICRO_TIPS_RELOAD_DISABLED = '子应用调用reload无法生效';
export const YBMICRO_TIPS_STOP_APP =
  '此报错可以忽略，iframe主动中断主应用代码在子应用运行';
export const YBMICRO_TIPS_NO_SUBJECT = '事件订阅数量为空';
export const YBMICRO_TIPS_NO_SCRIPT = '目标Script尚未准备好或已经被移除';
export const YBMICRO_TIPS_SCRIPT_ERROR_REQUESTED = '脚本请求出现错误';
export const YBMICRO_TIPS_CSS_ERROR_REQUESTED = '样式请求出现错误';
export const YBMICRO_TIPS_HTML_ERROR_REQUESTED = 'html请求出现错误';
export const YBMICRO_TIPS_REPEAT_RENDER =
  'YbMicro组件短时间重复渲染了两次，可能存在性能问题请检查代码';
